package cn.rkylin.oms.warehouseDocking.service.qimen;

import cn.rkylin.oms.warehouseDocking.dao.qimen.IReturnStockInCreateDAO;
import cn.rkylin.oms.warehouseDocking.vo.qimen.GoodsSynchronize;
import cn.rkylin.oms.warehouseDocking.vo.qimen.ReturnStockInCreate;
import cn.rkylin.oms.warehouseDocking.vo.qimen.ReturnStockInSkuCreate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 奇门获取需要创建的退货入库单信息服务层
 *
 * @author fengwang
 * @created 2017年11月7日
 */
@Service("returnStockInCreateService")
public class ReturnStockInCreateService {

    @Autowired
    IReturnStockInCreateDAO iReturnStockInCreateDAO;

    /**
     * 奇门获取需要创建的退货入库单ID
     *
     * @param reqMap
     * @return
     * @throws Exception
     */
    public List<ReturnStockInCreate> selectInfoReturnStockInIdByPrjIdAndStorId(Map<String, Object> reqMap) throws Exception {
        return iReturnStockInCreateDAO.selectInfoReturnStockInIdByPrjIdAndStorId(reqMap);
    }

    /**
     * 奇门获取需要创建的退货入库单信息
     *
     * @param reqMap
     * @return
     * @throws Exception
     */
    public ReturnStockInCreate selectInfoReturnStockInByPrjIdAndStorId(Map<String, Object> reqMap) throws Exception {
        return iReturnStockInCreateDAO.selectInfoReturnStockInByPrjIdAndStorId(reqMap);
    }

    /**
     * 奇门获取需要创建的退货入库单商品信息
     *
     * @param reqMap
     * @return
     * @throws Exception
     */
    public List<ReturnStockInSkuCreate> selectInfoReturnStockInSkuByStockId(Map<String, Object> reqMap) throws Exception {
        return iReturnStockInCreateDAO.selectInfoReturnStockInSkuByStockId(reqMap);
    }

    /**
     * 获取系统规格 即时成本价
     *
     * @param skuId
     * @return
     * @throws Exception
     */
    public GoodsSynchronize selectGoodsSkuCostBySkuId(String skuId) throws Exception {
        return iReturnStockInCreateDAO.selectGoodsSkuCostBySkuId(skuId);
    }
}
